package com.tudouji.project.mt.service.impl;

import java.util.List;
import com.tudouji.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.tudouji.project.mt.mapper.MtWhinitemMapper;
import com.tudouji.project.mt.domain.MtWhinitem;
import com.tudouji.project.mt.service.IMtWhinitemService;

/**
 * 美团入库明细Service业务层处理
 * 
 * @author tudouji
 * @date 2023-11-21
 */
@Service
public class MtWhinitemServiceImpl implements IMtWhinitemService 
{
    @Autowired
    private MtWhinitemMapper mtWhinitemMapper;

    /**
     * 查询美团入库明细
     * 
     * @param id 美团入库明细ID
     * @return 美团入库明细
     */
    @Override
    public MtWhinitem selectMtWhinitemById(Long id)
    {
        return mtWhinitemMapper.selectMtWhinitemById(id);
    }

    /**
     * 查询美团入库明细列表
     * 
     * @param mtWhinitem 美团入库明细
     * @return 美团入库明细
     */
    @Override
    public List<MtWhinitem> selectMtWhinitemList(MtWhinitem mtWhinitem)
    {
        return mtWhinitemMapper.selectMtWhinitemList(mtWhinitem);
    }

    /**
     * 新增美团入库明细
     * 
     * @param mtWhinitem 美团入库明细
     * @return 结果
     */
    @Override
    public int insertMtWhinitem(MtWhinitem mtWhinitem)
    {
        mtWhinitem.setCreateTime(DateUtils.getNowDate());
        return mtWhinitemMapper.insertMtWhinitem(mtWhinitem);
    }

    /**
     * 修改美团入库明细
     * 
     * @param mtWhinitem 美团入库明细
     * @return 结果
     */
    @Override
    public int updateMtWhinitem(MtWhinitem mtWhinitem)
    {
        mtWhinitem.setUpdateTime(DateUtils.getNowDate());
        return mtWhinitemMapper.updateMtWhinitem(mtWhinitem);
    }

    /**
     * 批量删除美团入库明细
     * 
     * @param ids 需要删除的美团入库明细ID
     * @return 结果
     */
    @Override
    public int deleteMtWhinitemByIds(Long[] ids)
    {
        return mtWhinitemMapper.deleteMtWhinitemByIds(ids);
    }

    /**
     * 删除美团入库明细信息
     * 
     * @param id 美团入库明细ID
     * @return 结果
     */
    @Override
    public int deleteMtWhinitemById(Long id)
    {
        return mtWhinitemMapper.deleteMtWhinitemById(id);
    }
}
